﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage<Dgg.Anug.Cqrs.Core.Application.DefectHandling.Commands.OpenIssue>" %>
<%@ Import Namespace="Dgg.Anug.Cqrs.Core.Presentation.Controllers" %>
<%@ Import Namespace="Dgg.Anug.Cqrs.Core.Application.DefectHandling.Commands" %>

<asp:Content ContentPlaceHolderID="TitleContent" runat="server">
	Open Issue
</asp:Content>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">

    <h2>Open Issue</h2>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Title) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Title)%>
                <%: Html.ValidationMessageFor(model => model.Title)%>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.SolutionId) %>
            </div>
            <div class="editor-field">
                <%= this.Select(m => m.SolutionId).Options((IEnumerable<SelectListItem>)ViewData[OpenIssue.Solutions])%>
            </div>

			<div class="editor-label">
                <%: Html.LabelFor(model => model.VersionId) %>
            </div>
            <div class="editor-field">
				<%= this.Select(m => m.VersionId).Options((IEnumerable<SelectListItem>)ViewData[OpenIssue.Versions])%>
            </div>

			<div class="editor-label">
                <%: Html.LabelFor(model => model.BuildId) %>
            </div>
            <div class="editor-field">
				<%= this.Select(model => model.BuildId).Options((IEnumerable<SelectListItem>)ViewData[OpenIssue.Builds])%>
            </div>

			<div class="editor-label">
                <%: Html.LabelFor(model => model.Description) %>
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.Description)%>
                <%: Html.ValidationMessageFor(model => model.Description)%>
            </div>

			<div class="editor-label">
                <%: Html.LabelFor(model => model.StepsToReproduce) %>
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.StepsToReproduce)%>
                <%: Html.ValidationMessageFor(model => model.StepsToReproduce)%>
            </div>

			<div class="editor-label">
                <%: Html.LabelFor(model => model.ExpectedResult) %>
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.ExpectedResult)%>
                <%: Html.ValidationMessageFor(model => model.ExpectedResult)%>
            </div>

			<div class="editor-label">
                <%: Html.LabelFor(model => model.ActualResult) %>
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.ActualResult)%>
                <%: Html.ValidationMessageFor(model => model.ActualResult)%>
            </div>
            
            <p>
                <input type="submit" value="Open" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink<IssueController>(c => c.List(), "Back to List") %>
    </div>

</asp:Content>

<asp:Content ContentPlaceHolderID="ScriptContent" runat="server">
	
</asp:Content>

